<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="/static/include/taglib.jsp" %>
<!DOCTYPE html >
<html>
<head>
    <meta name="viewport" content="width=device-width"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>后台管理--模板编辑</title>
    <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet"/>
    <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet"/>
    <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
    <script src="${ctxStatic}/layui/layui.all.js" type="text/javascript"></script>
</head>
<body>
<div class="tanchucontent" style="width:90%">
    <form class="layui-form" id="formedit" name="formedit" action="add_attroutine" method="post"
          target="d41d8cd98f00b204e9800998ecf8427e">
        <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>
        <table>
            <tr>
                <td class="td_right" style="min-width:60px;width:60px">年份：</td>
                <td>
                    <select id="year" name="year">
                        <option value="2025">2025年</option>
                        <option value="2024">2024年</option>
                        <option value="2023">2023年</option>
                        <option value="2022">2022年</option>
                        <option value="2021">2021年</option>
                        <option value="2020">2020年</option>
                        <option value="2019">2019年</option>
                        <option value="2018">2018年</option>
                        <option value="2017">2017年</option>
                    </select>
                </td>
                <td class="td_right" style="min-width:60px;width:60px">月份：</td>
                <td>
                    <select id="mouth" name="mouth">
                        <option value="1">1月</option>
                        <option value="2">2月</option>
                        <option value="3">3月</option>
                        <option value="4">4月</option>
                        <option value="5">5月</option>
                        <option value="6">6月</option>
                        <option value="7">7月</option>
                        <option value="8">8月</option>
                        <option value="9">9月</option>
                        <option value="10">10月</option>
                        <option value="11">11月</option>
                        <option value="12">12月</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="td_right" style="min-width:60px;width:60px">工作内容：</td>
                <td colspan="3">
                    <textarea class="layui-textarea" name="routinedes">${entity.routinedes }</textarea>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: center">
                    <button class="button" lay-submit="" lay-filter="demo1" id="btnsave">保存</button>
                    <input type="button" value="关闭" class="button" onclick="top.CloseOpenWindow()"/>
                </td>

            </tr>
        </table>

        <input type="hidden" id="hidyear" value="${year}"/>
        <input type="hidden" name="routineid" id="routineid" value="${routineid }">
        <input type="hidden" name="routinetype" value="2">

    </form>
    <input type="hidden" id="hidmonth" value="${entity.mouth }">

    <script>
        layui.use('form', function () {
            var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
            $("#year").val($("#hidyear").val());
            if ($("#routineid").val() > 0) {
                $("#mouth").val($("#hidmonth").val());
            } else {
                $('#mouth').val(new Date().getMonth() + 1)
            }
            form.render('select');

            form.render();
        });

        function CloseDialog(result, msg) {
            top.frames["iframe"].vAttRoutine.addresult(result, msg);
        }
    </script>
</div>
</body>
</html>